<template>
  <div class="app-container">
    <el-table v-loading="loading" :data="carPackageList">
      <el-table-column label="套餐名称" align="center" prop="serviceItemName" />
      <el-table-column label="套餐价格" align="center" prop="serviceItemPrice" />
      <el-table-column label="服务单项备注" align="center" prop="serviceItemInfo" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="状态" align="center" prop="status">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.aud_car_package_status" :value="scope.row.status"/>
        </template>
      </el-table-column>
      
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
import { listDoneCarPackage} from "@/api/audit/carPackage";

export default {
  name: "CarPackage",
  dicts: ['aud_car_package_status'],
  data() {
    return {
      
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 套餐审核表格数据
      carPackageList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        
      },
     
      
    };
  },
  created() {
    this.getList();
  },
  methods: {
    
    
    /** 查询待办套餐审核列表 */
    getList() {
      this.loading = true;
      listDoneCarPackage(this.queryParams).then(response => {
        this.carPackageList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
   }
  };
</script>
